// 呼叫中心呼入情况Echarts图表
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据
var option = {
	
	color: ['#3398DB'],

	grid: {
		left: '10%',
		right: '10%',
		bottom: '5%',
		containLabel: true
	},
	xAxis: [{
		name: '时间',
		nameTextStyle: {
			color: '#6f8fd8',
			fontSize: 12,
		},
		type: 'category',
		data: ['10:00～11:00', '', '12:00～13:00', '', '14:00～15:00', '', '16:00～17:00', '', '18:00～19:00', '', '20:00～21:00', '', '22:00～23:00', '', '00:00～01:00', '', '02:00～03:00', '', '04:00～05:00', '', '06:00～07:00', '', '08:00～09:00', ''],
		axisTick: {
			alignWithLabel: true,
			show: false
		},
		axisLine: {
			show: false
		},
		axisLabel: {
			textStyle: {
				color: '#7493d6'
			}
		}
	}],
	yAxis: [{
		name: '呼入量',
		nameTextStyle: {
			color: '#6f8fd8',
			fontSize: 12,
		},
		axisTick: {
			alignWithLabel: true,
			show: false
		},
		splitLine: {
			lineStyle: {
				color: ['#416bb5']
			}
		},
		axisLine: {
			show: false
		},
		axisLabel: {
			textStyle: {
				color: '#7493d6'
			}
		}
	}],

	series: [{
			name: '传统呼叫',
			type: 'bar',
			barWidth: '40%',
			barWidth: 8,

			data: [305, 251, 223, 208, 0, 354, 274, 237, 180, 108, 123, 87, 50, 16, 20, 9, 10, 4, 7, 32, 70, 145, 233, 420],
			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(
						0, 0, 0, 1, [{
							offset: 0,
							color: '#72daff'
						}, {
							offset: 1,
							color: '#4263a6'
						}]
					),
					label: {
						show: true, //是否展示  
						position: 'top',
						textStyle: {
							fontWeight: 'normal',
							fontSize: '12',
							color: '#6f8fd8'

						}
					},

					barBorderRadius: [20, 20, 0, 0],
					width: 1,
					shadowColor: 'rgba(0,0,0,0.2)',
					shadowBlur: 10,
					shadowOffsetX: -10
				}
			}
		},
		{
			name: '在线客服',
			type: 'bar',
			barWidth: '40%',
			barWidth: 8,
			data: [6, 4, 3, 3, 0, 4, 3, 7, 3, 1, 2, 1, 2, 5, 0, 0, 0, 0, 0, 0, 1, 0, 3, 5],
			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(
						1, 0, 0, 1, [{
							offset: 0.2,
							color: '#f43062'
						}, {
							offset: 1,
							color: '#9b27fa'
						}]
					),
					label: {
						show: true, //是否展示  
						position: 'top',
						textStyle: {
							fontWeight: 'normal',
							fontSize: '12',
							color: '#6f8fd8'

						}
					},
					barBorderRadius: [20, 20, 0, 0],
					width: 1,
					shadowColor: 'rgba(0,0,0,0.2)',
					shadowBlur: 10,
					shadowOffsetX: -10
				}
			}
		}
	]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
//window.onresize = myChart.resize;